package com.platform.wechat.controller;

import com.platform.wechat.common.JsonBean;
import com.platform.wechat.service.ProblemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author CX
 * @create 2021-08-01 20:14
 */
@RestController
@RequestMapping("problem")
public class ProblemController {

    @Autowired
    private ProblemService problemService;

    /**
     * 根据Type查询
     * @param problemType
     * @return
     */
    @GetMapping("selectByType")
    public JsonBean selectByType(Integer problemType){
        //System.err.println(problemType);
        //System.err.println(problemService.selectByPrimaryType(problemType));
        return problemService.selectByPrimaryType(problemType);
    }
}
